95 research outputs found
Static Detection of Race Conditions in Erlang
We address the problem of detecting some commonly occurring kinds of race conditions in Erlang programs using static analysis. Our analysis is completely automatic, fast and scalable, and avoids false alarms by taking language characteristics into account. We have integrated our analysis in dialyzer, a commonly used tool for detecting software defects in Erlang programs which is part of Erlang/OTP, and evaluate its effectiveness and performance on a suite of widely used industrial and open source programs of considerable size. The analysis has detected a significant number of previously unknown race conditions
Test-Driven Development of Concurrent Programs using Concuerror
This paper advocates the test-driven development of concurrent Erlang programs in order to detect early and eliminate the vast majority of concurrency-related errors that may occur in their execution. To facilitate this task we have developed a tool, called Concuerror, that exhaustively explores process interleaving (possibly up to some preemption bound) and presents detailed interleaving information of any errors that occur. We describe in detail the use of Concuerror on a non-trivial concurrent Erlang program that we develop step by step in a test-driven fashion
Systematic Testing for Detecting Concurrency Errors in Erlang Programs
We present the techniques used in Concuerror, a systematic testing tool able to find and reproduce a wide class of concurrency errors in Erlang programs. We describe how we take advantage of the characteristics of Erlang's actor model of concurrency to selectively instrument the program under test and how we subsequently employ a stateless search strategy to systematically explore the state space of process interleaving sequences triggered by unit tests. To ameliorate the problem of combinatorial explosion, we propose a novel technique for avoiding process blocks and describe how we can effectively combine it with preemption bounding, a heuristic algorithm for reducing the number of explored interleaving sequences. We also briefly discuss issues related to soundness, completeness and effectiveness of techniques used by Concuerror
Automatically Testing Functional Properties of Code Translation Models
Large language models are becoming increasingly practical for translating
code across programming languages, a process known as . Even
though automated transpilation significantly boosts developer productivity, a
key concern is whether the generated code is correct. Existing work initially
used manually crafted test suites to test the translations of a small corpus of
programs; these test suites were later automated. In contrast, we devise the
first approach for automated, functional, property-based testing of code
translation models. Our general, user-provided specifications about the
transpiled code capture a range of properties, from purely syntactic to purely
semantic ones. As shown by our experiments, this approach is very effective in
detecting property violations in popular code translation models, and
therefore, in evaluating model quality with respect to given properties. We
also go a step further and explore the usage scenario where a user simply aims
to obtain a correct translation of some code with respect to certain properties
without necessarily being concerned about the overall quality of the model. To
this purpose, we develop the first property-guided search procedure for code
translation models, where a model is repeatedly queried with slightly different
parameters to produce alternative and potentially more correct translations.
Our results show that this search procedure helps to obtain significantly
better code translations.Comment: 13 pages including appendix and reference
Synthesizing a Progression of Subtasks for Block-Based Visual Programming Tasks
Block-based visual programming environments play an increasingly important
role in introducing computing concepts to K-12 students. In recent years, they
have also gained popularity in neuro-symbolic AI, serving as a benchmark to
evaluate general problem-solving and logical reasoning skills. The open-ended
and conceptual nature of these visual programming tasks make them challenging,
both for state-of-the-art AI agents as well as for novice programmers. A
natural approach to providing assistance for problem-solving is breaking down a
complex task into a progression of simpler subtasks; however, this is not
trivial given that the solution codes are typically nested and have non-linear
execution behavior. In this paper, we formalize the problem of synthesizing
such a progression for a given reference block-based visual programming task.
We propose a novel synthesis algorithm that generates a progression of subtasks
that are high-quality, well-spaced in terms of their complexity, and solving
this progression leads to solving the reference task. We show the utility of
our synthesis algorithm in improving the efficacy of AI agents (in this case,
neural program synthesizers) for solving tasks in the Karel programming
environment. Then, we conduct a user study to demonstrate that our synthesized
progression of subtasks can assist a novice programmer in solving tasks in the
Hour of Code: Maze Challenge by Code-dot-org
- …